<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 
        Flex的两组核心概念 : 容器与项目 主轴与侧轴
        一条核心规则 : 项目默认情况下永远排列在主轴的正方向上

        容器: wrap
        项目: item

        flex容器上的属性:
                flex-direction 
                flex-wrap      
                flex-flow      
                
                justify-content               
                align-items
                align-content                                  
    -->
    <style>
        #wrap{
            width: 200px;
            height: 400px;
            border: 1px solid;
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            margin: auto;

            display: flex;
            flex-flow: row wrap;
            justify-content:space-between;
            align-items: flex-start;
            align-content:flex-end;
        }
        #wrap .item{
            width: 50px;
            height: 50px;
            text-align: center;
            line-height: 50px;
            background: pink;
            border: 1px solid;
            box-sizing: border-box;
        }
    </style>
</head>
<body>
    <div id="wrap">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
        <div class="item">5</div>
    </div>
</body>
</html>